<?php

use App\Admin\Form\Field\SelfTimeRange;
use Dcat\Admin\Admin;
use Dcat\Admin\Grid;
use Dcat\Admin\Form;
use Dcat\Admin\Grid\Column;
use Dcat\Admin\Grid\Filter;
use Dcat\Admin\Show;

/**
 * Dcat-admin - admin builder based on Laravel.
 * @author jqh <https://github.com/jqhph>
 *
 * Bootstraper for Admin.
 *
 * Here you can remove builtin form field:
 *
 * extend custom field:
 * Dcat\Admin\Form::extend('php', PHPEditor::class);
 * Dcat\Admin\Grid\Column::extend('php', PHPEditor::class);
 * Dcat\Admin\Grid\Filter::extend('php', PHPEditor::class);
 *
 * Or require js and css assets:
 * Admin::css('/packages/prettydocs/css/styles.css');
 * Admin::js('/packages/prettydocs/js/main.js');
 *
 */
app('view')->prependNamespace('admin', resource_path('views/admin'));
Column::extend('newEditable', \App\Admin\Grid\Displayers\NewEditable::class);
Form::extend("selfTimeRange",SelfTimeRange::class);

Admin::asset()->alias('@full-calendar', [
    'js' => [
        '/vendor/full-calendar/core.main.min.js',
        '/vendor/full-calendar/interaction.main.min.js',
        '/vendor/full-calendar/timeline.main.min.js',
        '/vendor/full-calendar/resource-common.js',
        '/vendor/full-calendar/resource-timeline.js',
    ],
    'css' => [
        '/vendor/full-calendar/css/core.main.min.css',
        '/vendor/full-calendar/css/resource-timeline.main.min.css',
        '/vendor/full-calendar/css/timeline.main.min.css',

    ]
]);
